// Package model
// @Author zhongxc
// @Date 2024/7/5 15:55:00
// @Desc
package model

import "time"

type BaseModel[T any] struct {
	CreatedAt time.Time `gorm:"column:created_at" json:"created_at"`
	CreatedBy string    `gorm:"column:created_by" json:"created_by"`
	Deleted   int8      `gorm:"column:deleted" json:"deleted"`
	DeletedAt time.Time `gorm:"column:deleted_at" json:"deleted_at"`
	UpdatedBy string    `gorm:"column:updated_by" json:"updated_by"`
	UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"`
}

const (
	IgnoreDeletedBy = "DeletedBy"
	IgnoreDeletedAt = "DeletedAt"
	IgnoreUpdatedBy = "UpdatedBy"
	IgnoreUpdatedAt = "UpdatedAt"
	IgnoreCreatedAt = "CreatedAt"
	IgnoreCreatedBy = "CreatedBy"

	StatusEnable  = 1 // 启用
	StatusDisable = 0 // 禁用

	DeleteEnable  = 0 // 删除-否
	DeleteDisable = 1 // 删除-是

	TableRole = "sys_role"
	TableMenu = "sys_menu"
)
